1. Field of the Invention
The present invention relates to a printing apparatus and a canceling method that process a request for canceling a print job.
2. Description of the Related Art
Hitherto, a technology is known in which jobs are transmitted by using the simple object access protocol (SOAP), which is an extensible-markup-language (XML) based communication protocol between networks, hereinafter referred to as a SOAP-XML technology. In a printing system for offering a print service by using the SOAP-XML technology, when a request for canceling a print job has been received from a host computer operated by a user of the print service, a response is transmitted from a printing apparatus to the user after the specified print job has been canceled. The process from the reception of the request for canceling the print job from the user of the print service to the transmission of the response is executed by a single process, which is a program-executing unit of the corresponding operating system (OS).
FIG. 15 illustrates a known process of canceling a print job transmitted using SOAP. When a canceling process P100a receives a request for canceling a print job from a user of the print service, the canceling process P100a requests a printer-control process group P200a to cancel the print job for which the request for canceling the print job is submitted. The printer-control process group P200a cancels the print job for which the request for canceling the print job is submitted, and notifies the canceling process P100a that the canceling has been executed.
After receiving the notification, the canceling process P100a transmits a response to the request for canceling the print job to the user of the print service. When an event transmitting process P300a receives a job-cancel event from the printer-control process group P200a, the event transmitting process P300a transmits the job-cancel event to a specified destination, if the destination is specified in the received job-cancel event.
FIG. 16 is a flowchart showing a process of canceling a print job in a known printing apparatus. When a request for canceling a print job has been transmitted from a host computer operated by a user of the print service to the printing apparatus, in Step S200, the printing apparatus analyzes XML data in the request for canceling the print job. In Step S201, the printing apparatus determines whether an error exists in the XML data analyzed in Step S200.
If the printing apparatus determines that no error exists in the XML data, in Step S202, the printing apparatus cancels the print job. In Step S203, the printing apparatus determines whether the print job is successfully canceled. If the printing apparatus determines that the print job is successfully canceled, in Step S204, the printing apparatus generates XML response data in response to the request for canceling the print job (refer to FIG. 10). In Step S205, the printing apparatus transmits the generated response data to the user of the print service.
If the printing apparatus determines in Step S201 that an error exists in the XML data in the request for canceling the print job, or if an error occurs in Step S203 (e.g., the print job has not successfully canceled), then in Step S206, the printing apparatus generates XML error response data. Then, in Step S205, the printing apparatus transmits the generated error response data to the user.
A printing system is known in which dummy print data having a cancel flag is transmitted to a printer when a user instructs the printing system to cancel a print job during the transmission of the print data in the print job (e.g., refer to Japanese Unexamined Patent Application Publication No. 2000-311069). With such a printing system, issuing the canceling instruction only once can delete the print data that has already been transmitted to the printer or can stop printing of the print data, thus reducing the burden on the user involving canceling of the print job. Furthermore, after the first canceling instruction has been issued, it is possible to actually delete the print data in the printer or to rapidly stop printing of the print data.
However, in the printing system offering a print service by using the SOAP-XML technology described above, when a request for canceling a print job has been submitted from a user, the notification of the canceling is transmitted to the user after the print job has been canceled. Hence, when the canceling process requires a long time, a network connection to the user can be broken due to timeout before the printing apparatus transmits a response to the request for canceling a print job to the user. In such a case, the user cannot be notified of the reception of the request for canceling a print job in the printing apparatus.
In addition, when it takes a long time for the printing apparatus to transmit a response to the request for canceling a print job, it is often the case that the user is unsure whether the print job was canceled, even without the network connection being broken. The same is true for the printing system disclosed in the above publication.